{{if validation_errors()}}
<ul class="message error">
    <li>{{validation_errors()}}</li>
</ul>
{{/if}}

<div class="clear"></div>
<form  class="block-content form" id="simple_form" method="post" action="create">
    <h1>{{$group->lang->line('group')}}</h1>
    <ul class="tabs js-tabs same-height">
        <li class="current"><a href="#tab-locales" title="Locales">{{$group->lang->line('current')}}</a></li>
        <li><a href="#tab-options" title="Options">{{$group->lang->line('options')}}</a></li>    
    </ul>
    <div class="tabs-content" >

        <div id="tab-locales">
            {{if isset($group->id)}}{{form_hidden('id', $group->id)}}{{/if}}

            <fieldset class="grey-bg required">			
                <legend>{{$group->lang->line('required')}}</legend>
                <p>
                    <label for="simple-required">{{$group->localize_label('title')}}</label>
                    <input type="text" name="title" id="simple-required" value="{{if isset($group->title)}}{{$group->title}}{{/if}}" class="full-width">
                    {{form_error('title')}}
                </p>
            </fieldset>

            <fieldset id="role" >
                <legend>{{$group->lang->line('other_info')}}</legend>                
                <label for="description">{{$group->localize_label('role')}}</label>	
                <ul>
                    {{foreach $role_list as $item}}
                    <li> <input type="checkbox" name="role[]" value="{{$item->id}}" {{if isset($checked_list) && in_array($item->id, $checked_list)}}checked="checked"{{/if}} /> {{$item->title}}</li>
                    {{/foreach}}
                </ul>                
            </fieldset>
        </div>
        <div id="tab-options">
            <p>
                <label for="description">{{$group->lang->line('description')}}</label>
                <textarea name="description" cols="10" class="full-width text-editor tinymcesimple">{{if isset($group->description)}}{{$group->description}}{{/if}}</textarea>
            </p>
        </div>
        <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
        <div class="clear"></div>
        <fieldset class="grey-bg no-margin">
            <legend>{{$group->lang->line('action')}}</legend>
            <p class="input-with-button">
                <button type="submit">{{$group->lang->line('save')}}</button>
            </p>
        </fieldset>	

    </div>
</form>
